package com.lonely.fx.tree_view.entity;

import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;

/**
 * @date: 2022-08-04 10:37
 * @author: ztkj-hzb
 * @description: 测试cellfactory中 使用 checkboxtreecell 回显效果
 **/
public class TestCheckBoxTreeCellDto {

    /**
     * 是否选中
     */
    private SimpleBooleanProperty selected = new SimpleBooleanProperty();

    /**
     * 展示数据
     */
    private SimpleStringProperty data = new SimpleStringProperty();


    public TestCheckBoxTreeCellDto(boolean selected, String data) {
        this.selected.set(selected);
        this.data.set(data);
    }

    public boolean isSelected() {
        return selected.get();
    }

    public SimpleBooleanProperty selectedProperty() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected.set(selected);
    }

    public String getData() {
        return data.get();
    }

    public SimpleStringProperty dataProperty() {
        return data;
    }

    public void setData(String data) {
        this.data.set(data);
    }
}
